import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import {BrowserRouter as Router, Route} from 'react-router-dom';
import BlogDetail from "./componse/detail/BlogDetail";
import {Provider} from "mobx-react";
import blogStore from './store/blogStore'

class Appes extends React.Component {
    render() {
        return (
            <Router>
                <Provider blogStore={blogStore}>
                    <div>
                        <Route exact path="/" component={App}></Route>
                        <Route path="/blog/:blogId" component={BlogDetail}></Route>
                    </div>
                </Provider>
            </Router>
        );
    }
}

ReactDOM.render(<Appes/>, document.getElementById('root'));

